var num = 0;
var max = 10;

function incrementNumber(){
    num++;
    console.log(num)
    if(num < max){
        setTimeout(incrementNumber,500)
    }else{
        console.log('done')
    }
}
setTimeout(incrementNumber,500)
